<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.sbl.bajw.common.web.RequestUnit"%>
<%@page import="com.sbl.bajw.pc.model.CameraModel"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="../../common/prama.jsp" %>
<%
    List<HashMap<String,String>> pics = (List<HashMap<String,String>>)request.getAttribute("pics");
    CameraModel model = (CameraModel)request.getAttribute("model");
    String tag = RequestUnit.getString("tag");
    String installDate = "";
    if(model.getInstallDate() != null){
    	SimpleDateFormat df = new SimpleDateFormat("yyyy-M-dd");
    	installDate = df.format(model.getInstallDate());
    }
%>
<script type="text/javascript" src="${burl }/js/business/manager/CameraDetail.js"></script>
<div class="CommonPanel" id="msg_search_div">
	<input type="hidden" id="model_id" value="${model.id }"/>
	<div style="float:left;width:200px;height:200px;overflow: hidden;position: relative;">
		<div id="picContentDiv" style="width:<%=200*pics.size()%>px;position: absolute;left:0">
		<%
			for(int i = 0 ;i<pics.size();i++){
				String imgUrl = BaseUrl +"/"+ pics.get(i).get("SMALLIMGURL");
			%>
			<img width="200" style="float:left" src="<%=imgUrl%>"/>
			
			<%
			}
		%>
		</div>
	<img id="preBtn" style="position: absolute;left: 0;top: 50%;cursor: pointer;" src="${burl }/images/camera/picArrowLeft.png"/>
		<img id="nextBtn" style="position: absolute;right: 0;top: 50%;cursor: pointer;" src="${burl }/images/camera/picArrowRight.png"/>
	</div>
	<table >
		<tr>
			<td class="label">摄像头所有人或单位:</td>
			<td class="input" style="width: 150px;">
				${model.belongName }
			</td>
			<td class="label">联系电话:</td>
			<td class="input" style="width: 150px;">
				${model.belongPhone }
			</td>
			<td class="label">监控室地址:</td>
			<td class="input" style="width: 150px;">
				<a href="${burl}/view/manager/main.jsp?action=/CameraHouse/detail.do?id=${model.houseAddress }&tag=audit">${model.camerahousename}</a>
			</td>
		</tr>
		<tr>
			<td class="label">厂家:</td>
			<td class="input">
				${model.factoryName }
			</td>
			<td class="label">摄像头地址:</td>
			<td class="input">
				${model.cameraAddress }
			</td>
			<td class="label">ATM编号:</td>
			<td class="input">
				${model.atmCode }
			</td>
		</tr>
		<tr>
			<td class="label">基站名称:</td>
			<td class="input">
				${model.baseStationName }
			</td>
			<td class="label">基站代码:</td>
			<td class="input">
				${model.baseStationCode }
			</td>
			<td class="label">基站运营商：</td>
			<td class="input">
				${model.yunyingshangname }
			</td>
		</tr>
		<tr>
			<td class="label">摄像头类型：</td>
			<td class="input">
				${model.classname }
			</td>
			<td class="label">摄像头方向：</td>
			<td class="input">
				${model.directionname }
			</td>
			<td class="label">摄像头场所：</td>
			<td class="input">
				${model.placename }
			</td>
		</tr>
		<tr>
			<td class="label">摄像头保存时间：</td>
			<td class="input">
				${model.savetimeName }
			</td>
			<td class="label">摄像头类别：</td>
			<td class="input">
				${model.typename }
			</td>
			<td class="label">采集人姓名:</td>
			<td class="input">
				${model.creatername }
			</td>
		</tr>
		<tr>
			<td class="label">账号:</td>
			<td class="input">
				${model.accountname }
			</td>
			<td class="label">身份证:</td>
			<td class="input">
				${model.cardId }
			</td>
			<td class="label">银行帐号:</td>
			<td class="input">
				${model.bankcardNo }
			</td>
		</tr>
		<tr>
			<td class="label">楼栋编号:</td>
			<td class="input">
				${model.buildingCode }
			</td>
			<td class="label">创建时间:</td>
			<td class="input">
				${model.createtime }
			</td>
		</tr>
		<tr>
			<td class="label">安装时间:</td>
			<td class="input">
				<%=installDate %>
			</td>
			<td class="label">环境:</td>
			<td class="input">
				<%
					if(model.getIndoorOutdoor() == "1"){ 
				%>
				室内
				<%
					}else { 
				%>
				室外
				<%
					}
				%>
			</td>
		</tr>
		<tr>
			<td class="label">审核人：</td>
			<td class="input">
				${model.auditusername }
			</td>
			<td class="label">审核时间：</td>
			<td class="input">
				${model.audittime }
			</td>
			<td class="label">审核结果：</td>
			<td class="input">
				<%
					if(model.getIsQuelity().equals("1")){ 
				%>
				审核通过
				<%
					}else if(model.getIsQuelity().equals("-1")){ 
				%>
				审核未通过
				<%
					}else{ 
				%>
				未审核
				<%
					}
				%>
			</td>
		</tr>
		<tr>
			<td class="label">审核原因：</td>
			<td class="input" rowspan="5">
				${model.auditreason }
			</td>
		</tr>
	</table>
	<input id="lat" type="hidden" value="${model.lat }"/>
	<input id="lon" type="hidden" value="${model.lon }"/>
	<input id="cameraclass" type="hidden" value="${model.cameraClass }"/>
	<input id=parentMenu type="hidden" value="/Camera/List.do"/>
	
	<div style="clear: both;margin-bottom: 4px"></div>
	<div id="bmap" style="height: 270px;width: 100%;"></div>
	<div style="text-align: center;">
		<%
			if(tag.equals("audit") && model.getIsQuelity().equals("0")){
			%>
				<button class="commonBtn" style="font-size: 20px" id="auditBtn">审核</button>
			<%
			}
		%>
		<button class="commonBtn" style="font-size: 20px" id="backBtn" onclick="window.close()">关闭</button>
	</div>
</div>